import urllib.request
import re
url="https://www.52pojie.cn/forum-24-1.html"
page=urllib.request.urlopen(url).read()
page=page.decode("gbk")
print(page)
zz=r'<a href="(thread-.+?)".+? class="s xst">(.+?)</a>'
html=re.findall(zz,page,re.S)
print(html)
for line in html:
    html_link=re.findall(zz,line,re.S)
    title=html_link[0][1]
    link=html_link[0][0]
    print('%d.%s https://www.52pojie.cn/%s'%(title_naumber,title,link))
    title_naumber=title_naumber+1




